package com.chongzi.cloud;

public class code206 {
    public ListNode reverseList(ListNode head){
        ListNode pre=null;//指向=具体的节点
        ListNode cur=head;
        ListNode temp=null;
        while (cur!=null){
            temp=cur.next;
            cur.next=pre;
            pre=cur;
            cur=temp;
        }
    return pre;

    }
}
